IMPORTANT: Unicode-encoded font name entries have 8-bit instead of the expected 16-bit names. As a result, to locate a Unicode-encoded font name string, you must use the constant kFontMacintoshPlatform with the Unicode script code constant representing the script ID of Unicode encoding you want to find.
You can pass the
kFontNoPlatform constant if you do not care about the encoding of a font name string. In this case,
ATSUFindFontName and
ATSUFindFontFromName will pass back the first font in the name table that matches the other font name parameters that you specified.
enum {
kFontNoPlatform = -1,
kFontUnicodePlatform = 0,
kFontMacintoshPlatform = 1,
kFontReservedPlatform = 2,
kFontMicrosoftPlatform = 3,
kFontCustomPlatform = 4
};
typedef UInt32 FontPlatformCode;
Constant descriptions
-
kFontNoPlatform
-
Indicates that you do not care about the platform of the font name. In this case, you will get the first font name in the name table that matches the other parameters you specified. If you specify this constant, you should pass the constant kFontNoScript for the font name's script code.
-
kFontUnicodePlatform
-
Identifies the Unicode character code specification as the platform of the font name string.
-
kFontMacintoshPlatform
-
Identifies one of the Macintosh character code sets as the platform of the font name string.
-
kFontReservedPlatform
-
Reserved for future use.
-
kFontMicrosoftPlatform
-
Identifies one of the Microsoft character code sets as the platform of the font name string.
-
kFontCustomPlatform
-
Identifies the default platform as defined by the font for the platform of the font name string. If you specify this constant, the character encoding of a font does not correspond to a specific standard.